﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanyUserList.aspx.cs" Inherits="WebSite.admin.company.CompanyUserList" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>后台用户管理</title>
    <link href="../main.css" rel="stylesheet" type="text/css" />


</head>
<body bgcolor="#F1F4F7">
    <form id="form1" runat="server">
    <div>
    
    <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#F1F4F7">
        <tr>
          <td align="center" bgcolor="#F1F4F7"> 
      <br />
        <div style="width:98%; text-align:right;">
              
  <asp:Button ID="btnAdd" runat="server" Text="添加新用户" onclick="btnAdd_Click" />
  </div>
  <br />
          
<asp:GridView ID="GridView1" runat="server" Width="98%" CellPadding="4" 
        ForeColor="#333333" DataKeyNames="Adminid" AutoGenerateColumns="False" 
        AllowPaging="True" pagesize="100" BorderStyle="Solid" BorderWidth="1px" 
      ShowFooter="false" EmptyDataText="没有数据记录！！" AllowSorting="True" 
       onrowdatabound="GridView1_RowDataBound" 
       >
        <Columns>
       <asp:HyperLinkField DataNavigateUrlFields="Adminid" DataNavigateUrlFormatString="adduser.aspx?uid={0}" HeaderText="登录名称" DataTextField="AdminUser" >
        <ItemStyle HorizontalAlign="Left" />
       </asp:HyperLinkField>             
                <asp:BoundField DataField="AdminName" HeaderText="用户名称"  >
                <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                 <asp:BoundField DataField="AdminType" HeaderText="用户类型"  >
                <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="LoginDegree" HeaderText="登录次数" />
                <asp:BoundField DataField="Logintime" HeaderText="最后登录时间" />
                <asp:BoundField DataField="LoginIP" HeaderText="最后登录IP" />

                 <asp:TemplateField ShowHeader="False" HeaderText="操作">
             <ItemTemplate>

               <a href="addCompanyUser.aspx?id=<%= CompanyId %>&uid=<%# Eval("Adminid") %>" title="编辑"><img height="16" src="../images/icon_edit.gif" width="16" border="0" /></a>
           <a title="移除" href="CompanyUserList.aspx?id=<%= CompanyId %>&uid=<%# Eval("Adminid") %>&action=del" onclick="javascript:return confirm('你确定要删除这个管理员吗?');"><img height="16" src="../images/icon_drop.gif" width="16" border="0" /></a>
               <a href=" <%# Eval("AdminTypeId").ToString() == "1" ? "SalesmanRelation.aspx?uid=" + Eval("Adminid")+"&cid="+CompanyId : "CompanyRule.aspx?uid=" + Eval("Adminid") %>" title="权限"><img height="16" src="../images/icon_rule.gif" width="16" border="0" /></a>            
            </ItemTemplate>
        </asp:TemplateField>
        </Columns>
             <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />             
             <PagerStyle BackColor="White" ForeColor="#333333" HorizontalAlign="Center" Font-Bold="True" Font-Size=30px />
             <HeaderStyle BackColor="#E2E7EB" Font-Bold="True" ForeColor="Black" HorizontalAlign="Left" />
             <AlternatingRowStyle BackColor="White" />
             <PagerSettings Visible="False" />
        </asp:GridView>
     <table Width="98%" border="0" cellspacing="0" cellpadding="0">
       <tr>
         <td>&nbsp;</td>
         <td height="25" align="right" bgcolor="#E9ECEF"><asp:Label ID="LblRecordCount" runat="server"></asp:Label>
            <asp:Label ID="LblCurrentIndex" runat="server"></asp:Label>
            <asp:Label ID="LblPageCount" runat="server"></asp:Label>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <asp:LinkButton ID="btnFirst" CommandArgument="first" OnClick="PagerButtonClick" runat="server">首 页</asp:LinkButton> 
            <asp:LinkButton ID="btnPrev" CommandArgument="prev" OnClick="PagerButtonClick" runat="server">上一页</asp:LinkButton> 
            <asp:LinkButton ID="btnNext" CommandArgument="next" OnClick="PagerButtonClick" runat="server">下一页</asp:LinkButton> 
            <asp:LinkButton ID="btnLast" CommandArgument="last" OnClick="PagerButtonClick" runat="server">尾 页</asp:LinkButton> 
             跳转到第<asp:DropDownList ID="ddlCurrentPage" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"> </asp:DropDownList>页&nbsp;
         </td>
       </tr>
    </table>

          </td>
        </tr>
      </table>
        </div>
    </form>
</body>
</html>
